#include<bits/stdc++.h>
using namespace std;
const int maxn = 1006;
int r[maxn],b[maxn];
void solve() {
  int n;cin>>n;
  cin.get();
  for(int i=0;i<n;++i)r[i]=cin.get()-'0';
  cin.get();
  for(int i=0;i<n;++i)b[i]=cin.get()-'0';
  int res = 0;
  for(int i=0;i<n;++i) {
    if(r[i]>b[i])res++;
    else if(r[i]<b[i])res--;
    else ;
  }

  if(res>0) cout<<"RED\n";
  else if(res<0) cout<<"BLUE\n";
  else cout<<"EQUAL\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  int tc;cin>>tc;
  for(int t=1;t<=tc;++t) {
    solve();
  }
  return 0;
}
